﻿Public MustInherit Class WorkComparison_IF
    '比對
    MustOverride Function Comparison() As Boolean
    '更新
    MustOverride Function Update() As Boolean
    Private doUpdate As Boolean
    Sub New()
        doUpdate = False
    End Sub
    Public Function run_Update() As Boolean

        Dim isSuccess As Boolean = True
        Try
            If Not Comparison() Then
                doUpdate = True
                isSuccess = Update()
            End If
            Return isSuccess
        Catch ex As Exception
            Throw ex
            Return False
        End Try

    End Function
    Function isUpdate() As Boolean
        Return doUpdate
    End Function

End Class
